package org.example.ssm.controller;

import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author 莫磊
 * @date 2025/8/19
 * @description
 */
@Controller
public class UserController {

    @ResponseBody
    @GetMapping("/body")
    public String body() {
        PageHelper.startPage(1, 10);
        return "hello world";
    }

    @GetMapping("/view")
    public String view(Model model) {
        model.addAttribute("name", "molei");
        return "index";
    }
}
